package com.ebt.m.data.bean;

import android.content.Intent;
import android.graphics.drawable.Drawable;

import com.ebt.m.repository.provider.FileTypeHelper;
import com.ebt.m.repository.provider.FileTypeHelper.FileTypeAll;

/**
 * 我的资源库中文件实体类--对应File
 * 
 * @author Damon.Han
 */
public class EbtFile {
	
	public long dbId;
	public String dbUuid;
	public String path;// 路径
	public FileTypeAll type;// 文件类型FileUtils
	public String name;// 文件名
	public long size;// 文件大小
	public long lastModify;// 上次修改
	public boolean isFolder;// 是否文件夹
	public int childs;// 子文件数量

	public int imageResource;// 图标路径
	public String packageName;// 包名(用于应用程序)
	public String activityName;// 启动activity名
	public boolean choosed;
	public Intent intent;// 快捷方式使用
	public Drawable appIcon;// app列表的图标
	public byte[] shortcutIcon;// shotcut列表的图标数据(这个数据是保存在数据库中的)
	public String intentString;

	public boolean canRead;
	public boolean canWrite;
	public boolean isHidden;
	public int count;
	public String author;
	public String description;// 描述
	public String url;// 服务器url
	public String HashKey;

	public EbtFile() {
	}

	public EbtFile(String path, int type, String name, String packageName, String className) {
		this.path = path;
		this.type = FileTypeAll.valueOf(type);
		this.name = name;
		this.packageName = packageName;
		this.activityName = className;
	}

	@Override
	public String toString() {
		return " EBTFile : { dbUuid : " + dbUuid + " , path : " + path + " , type : " + type + " , name : " + name + " } ";
	}

}
